<?php

class TeaserPage extends Page {
	static $db = array(
	);
	
	static $has_many = array(
		"Teasers" => "Teaser",
	);
	
	function getCMSFields() {
		$f = parent::getCMSFields();
		
      	$teaserTable = new DataObjectManager(
			$this,
         	'Teasers',
         	'Teaser',
			Teaser::$field_names,
			Teaser::getCMSFields_forPopup(),
			"PageID = {$this->ID}",
			'Created ASC'
      	);
      	
      	$f->addFieldToTab( 'Root.Content.Teasers', $teaserTable );
      	
      	return $f;
	}
	
}
 
class TeaserPage_Controller extends Page_Controller {
	function init(){
		parent::init();
	}
}